package com.wd.tw.job;

import com.wd.tw.websocket.client.CustomerClientService;
import lombok.extern.java.Log;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @className: WebSocketScheduler
 * @description: TODO 类描述
 * @author: liumingkun
 * @date: 2024/11/25
 **/

@Log
@Component
public class WebSocketScheduler {

    @Resource
    CustomerClientService clientService;


    // 每隔15分钟重新连接socket
    @Scheduled(initialDelay = 1000 * 10, fixedDelay = 1000 * 60 * 10)
    public void scheduleTokenFetch() {

        clientService.connectServer();
    }
}
